from django.db.models import Q
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from filters.sentences import XML_to_sentences
from filters.pos import XML_to_POS
from models import XMLFile, Sentence, Word


def stats(request):
    # get data
    sentences = Sentence.objects.all()
    words = Word.objects.all()
    return render_to_response(
        'stats.html',
        {'sentences':sentences,
         'words':words},
        context_instance=RequestContext(request))

    
